xen/arm: vgic: Correctly emulate write when byte is used
authorJulien Grall <julien.grall@citrix.com>
Tue, 22 Sep 2015 20:18:48 +0000 (21:18 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 24 Sep 2015 10:41:16 +0000 (11:41 +0100)
commit3f214fea76acc6cbc1101fe1815cee795483a67d
tree7d319f932b179d2c83c134075c21a42d51707753
parent9cc1346f1c578050d274133dc777000247adfc11
xen/arm: vgic: Correctly emulate write when byte is used

When a guest is writing a byte, the value will be located in bits[7:0]
of the register.

Although the current implementation is expecting the byte at the Nth
byte of the register where N = address & 4;

When the address is not 4-byte aligned, the corresponding byte in the
internal state will always be set to zero rather.

Note that byte access are only used for GICD_IPRIORITYR and
GICD_ITARGETSR. So the worst things that could happen is not setting the
priority correctly and ignore the target vCPU written.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/include/asm-arm/vgic.h